package com.artwork.utils;

import com.artwork.model.SysUser;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;

/**
 * 后台功能所用工具类
 */
public class AdminUtil {

    public static SysUser getLoginUser(HttpServletRequest request) {
        HttpSession session = request.getSession();
        if (null == session) {
            return null;
        }
        return (SysUser) session.getAttribute("admin");
    }
}
